package org.bigplayer.controller;

import lombok.extern.slf4j.Slf4j;
import org.bigplayer.pojo.DoubleReq;
import org.bigplayer.pojo.ThreeReq;
import org.bigplayer.service.impl.SkySoilServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RefreshScope
@RequestMapping("/double")
public class BasketController {
    @Autowired
    SkySoilServiceImpl skySoilService;

    @PostMapping("/getData")
    public String getData(@RequestBody DoubleReq doubleReq) {
      return  skySoilService.getDoubleData(doubleReq);
    }


    @PostMapping("/getThreeData")
    public String getThreeData(@RequestBody ThreeReq threeReq) {
        return skySoilService.getThreeData(threeReq);
    }



}
